package com.hk.service.order;

import com.hk.commons.HqlFilter;
import com.hk.commons.entity.order.OrderContract;

import java.util.HashMap;
import java.util.List;

public interface IOrderContract {


	/**
	 * 根据条件进行筛选
	 * @param hqlFilter
	 * @return
     */
	public List<OrderContract> findByFilter(HqlFilter hqlFilter);

	/**
	 * 根据订单id和合同ID创建单一合同
	 * @param orderId
	 * @return
	 */
	public Boolean createOne(long orderId, long contractId);


	/**
	 * 根据订单id创建该订单产品关联的所有合同创
	 * @param orderId
	 * @return
	 */
	public Boolean createByOrderId(long orderId);


	/**
	 * 根据订单ID 获取订单所关联的产品
	 * @param orderId
	 * @return
     */
	public List<OrderContract> getOrderContractList(long orderId);

	/**
	 * 获取投资确认函的PDF链接
	 * @param orderId
	 * @return
     */
	public String  getTZQRHPDFUrl(Long orderId);

	/**
	 * 获取产品电子合同PDFURL
	 * @param orderId
	 * @param contractId
     * @return
     */
	public String getPDFContarctUrlByOrder(long orderId, long contractId);

	/**
	 * 获取产品电子合同HTMLURL
	 * @param orderId
	 * @param contractId
	 * @return
	 */
	public String getHTMLContarctUrlByOrder(long orderId, long contractId);


	/**
	 * 根据用户ID生成合同HTML
	 * @param userId
	 * @return
     */
	public String getHTMLContarctUrlByUser(long userId, long timeLong);


	/**
	 * 获取用户kyc风险等级PDF
	 * @param userId
	 * @return
     */
	public String getKycPdfUrl(long userId);

	/**
	 * 获取用户kyc风险等级HTML
	 * @param userId
	 * @return
	 */
	public String getKycHTMLUrl(long userId);


	/**
	 * 根据订单生成相应的合同
	 * @param userId
	 * @param contractId
	 * @return
     */
	public String createContractPDFByUser(long userId, long contractId, long timeLong);


	/**
	 * 根据用户生成相应的合同
	 * @param orderId
	 * @param contractId
	 * @return
     */
	public String createContractPDFByOrder(long orderId, long contractId);

	public void sign(String source01, String source02 );

	public void sign(String source01, String source02, Integer pageNum );

	public String createPDFDocument(String contractMsg,Long orderId,Long contractId);

	public String createHTMLDocument(String contractMsg,Long orderId,Long contractId);

	public String createPDFDocument(String contractMsg, String fileName, Boolean ifDelete);

	public String createHTMLDocument(String contractMsg, String fileName, Boolean ifDelete);

	public String ftpSave(String filePath, String orderIdStr, Boolean ifDelete);


	public String getHtmlContent( String content);

	public HashMap reCreatePDFAndHTMLForSameContract(Long contractId);
}
